export default {
	data() {
		return {
			listTop:0,
			list: [],
			  
			isIphoneX: false,
			coupon: 0,
			emptyShow: false,
			isList: false,//列表样式
			 
		}
	},

	onLoad(options) {
		// console.log(options)
		// #ifdef APP-PLUS
		var obj = JSON.parse(options.obj);
		// #endif
		
		// #ifdef MP-WEIXIN
		var obj = JSON.parse(decodeURIComponent(options.obj));
		// #endif
		var listTop = 70;
		this.listTop = listTop; 
		this.height = uni.getSystemInfoSync().windowHeight  + 'px'
		 
	},
	onShow() {
		 
	},
	methods: {
		  
		itemClick(item,e){
			 
		},
		  
		getShopList(mescroll) {
			console.log('=====')
			mescroll.endSuccess(this.list.length);
			// if (this.$refs.loadingCover) this.$refs.loadingCover.show();
			  
				 
		},
		changeListStyle() {
			this.isList = !this.isList
		},
		 
		 
		//商品详情
		toDetail(item) {
			// console.log(item)
			 
		},
	  
		 
		//重置数据
		resetData() {
			this.categoryId = 0
			 
			this.isFreeShipping = false
		},
		goodsImg(imgStr) {
			// let imgs = imgStr.split(',');
			// return imgs[0] ? this.$util.img(imgs[0], {
			// 	size: 'mid'
			// }) : this.$util.getDefaultImage().default_goods_img;
		},
		imgError(index) {
			this.goodsList[index].goods_image = this.$util.getDefaultImage().default_goods_img;
		},
		 showPrice(data) {
		 	// let price = data.discount_price;
		 	 
		 	return "price";
		 },
		  
	}

}
